<template>
  <el-select :value="val" placeholder="请选择" @focus="getCitys" @change="getCity_qu">
    <el-option v-for="(item, index) in citys" :key="index" :label="item" :value="item"></el-option>
  </el-select>
</template>
<script>
import { provinces } from '@/api/hmmm/citys.js'
export default {
  name: 'province',
  props: {
    val: {
      type: String
    }
  },
  data () {
    return {
      citys: []
    }
  },
  methods: {
    getCitys () {
      this.citys = provinces()
    },
    getCity_qu (val) {
      this.$emit('setCity', val)
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
